package com.lyz.dz.des.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author <a href="https://fengwenyi.com">Erwin Feng</a>
 * @since 2021-08-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
public class UserEntity extends Model<UserEntity> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "user_id", type = IdType.AUTO)
    private Integer userId;

    /**
     * 真实姓名
     */
    @TableField("real_name")
    private String realName;

    /**
     * 称昵
     */
    @TableField("nick_name")
    private String nickName;

    /**
     * 码密
     */
    @TableField("password")
    private String password;

    /**
     * 户用等级
     */
    @TableField("user_leven")
    private Integer userLeven;

    /**
     * 普通用户类别
     */
    @TableField("user_category")
    private String userCategory;

    /**
     * 别性0女1男
     */
    @TableField("sex")
    private Integer sex;

    /**
     * 话电
     */
    @TableField("phone")
    private String phone;

    /**
     * 日生
     */
    @TableField("pirthday")
    private LocalDateTime pirthday;

    /**
     * 箱邮
     */
    @TableField("email")
    private String email;

    /**
     * 像头
     */
    @TableField("header_image")
    private String headerImage;

    /**
     * 回找密码问题
     */
    @TableField("question")
    private String question;

    /**
     * 回找密码答案
     */
    @TableField("answer")
    private String answer;

    /**
     * 立建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 否是有效，1有效，0无效
     */
    @TableField("is_effect")
    private Integer isEffect;

    /**
     * 0不可以发布1可以发布
     */
    @TableField("is_work")
    private Integer isWork;

    /**
     * 注备
     */
    @TableField("remark")
    private String remark;


    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

}
